import unittest
from apis.login import LoginAPI
import requests


class LoginTestCase(unittest.TestCase):

    def setUp(self):
        # 创建一个会话对象
        self.session = requests.session()
        self.api = LoginAPI()

    def tearDown(self):
        # 关闭一个会话对象
        self.session.close()

    def test_login_01(self):
        self.api.do_login(self.session, {"username": "张三", "password": "123"})

    def test_login_02(self):
        self.api.do_login(self.session, {"username": "张三", "password": "123456"})
